<template>
  <div>
    <el-row class="home" :gutter="20">
      <el-col class="left-1" :span="8">
        <el-card shadow="hover">
          <div class="user">
            <img class="user-img" :src="userimage" />
            <div class="user-info">
              <p class="name">{{ username }}</p>
              <p class="acess">{{ useracess }}</p>
            </div>
          </div>
          <div class="login-info">
            <p>
              上次登陆时间<span>{{ recentlogindate }}</span>
            </p>
          </div>
        </el-card>
        <el-card style="margin-top: 20px; height: 460px" shadow="hover">
          <div v-for="(val, key) in tablelabel" :key="key">
            <p>{{ val }}</p>
            <p>{{ key }}</p>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>
<script>
export default {
  name: "home",
  data() {
    return {
      userimage: require("../assets/images/user.png"),
      recentlogindate: "2021-01-01",
      username: "LKY",
      useracess: "员工",
      tablelabel: {
        name: "名字",
        today: "今天",
      },
    };
  },
};
</script>

<style lang="less" scoped>
.left-1 {
  margin-top: 20px;
}
.user {
  display: flex;
  align-items: center;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid #ccc;
}
.user-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin-right: 40px;
}
.login-info {
  p {
    line-height: 28px;
    font-size: 16px;
    color: #999999;
    span {
      color: #666666;
      margin-left: 60px;
    }
  }
}
.user-info {
  .name {
    font-size: 32px;
    margin-bottom: 10px;
  }
  .access {
    color: #999999;
  }
}
</style>
